Set Text
AutomatR.Web.SetText
The "Set Text" activity in AutomatR is designed for UI automation workflows, allowing you to write a string to the Text attribute of a specified UI element on a web page. This activity is useful for entering text into input fields or other elements that accept textual input.
Properties
Name | Description |
---|---|
Input | |
Element | Select the web element using the provided selector window. This indicates the UI element on the web page. Use either the "Element" or "WebElement" property. |
WebElement | Enter the UI element variable identified by the "Find Element" or other activities. Use either the "Element" or "WebElement" property. |
Text | Enter the string text to be written to the specified UI element. This is the text that will be entered into the targeted element on the web page. |
Optional | |
Timeout | Enter the time, in seconds (e.g., 5), for the activity to be executed before throwing an exception. This is the maximum time the activity will wait for the UI element to be ready for text input. If not provided, a default timeout will be used. |
Delay | Enter the wait time in seconds before starting the activity. This can be useful for handling synchronization issues or waiting for specific conditions before setting text. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. String variables containing the desired display name. |
Highlight Time | If the workflow instance is set to highlight elements during execution, specify the time duration (in milliseconds) for which the element should be highlighted after setting the text. |
How to use:
- Drag and drop the "Set Text" activity onto the workflow.
- Configure the properties by selecting the web element or providing the UI element variable and entering the text to be set.
- Optionally, configure the timeout, delay, and highlight time.
- Execute the workflow to write the specified text to the targeted UI element on the web page.
Example: Consider an example where the "Set Text" activity is used to enter a search query into a search input field on a web page:
Set Text:
Element: (Use the selector window to choose the search input field)
Text: "AutomatR Workflow"
Timeout: 5 (seconds)
Delay: 2 (seconds)
Highlight Time: 500 (milliseconds)
In this example, the activity sets the specified text "AutomatR Workflow" into the search input field. The timeout is set to 5 seconds, there's a delay of 2 seconds before starting the activity, and the element is highlighted for 500 milliseconds after setting the text.